package demo3;

import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ASUS
 * Date: 2023-10-09
 * Time: 18:00
 */
public class Test7 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int sum = 0;
        int i = scanner.nextInt();
        for (; i < 5; i++) {
            int ret = 1;
            for (int j = 1; j <= i; j++) {
                ret *= i;
            }
            sum += ret;
        }
        System.out.println(sum);
    }
}
